import React  from "react";
import ReactDOM  from "react-dom/client";

import App from "./App";

// 5. 导入 store
import store from "./store/transit";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
    <React.StrictMode>
      <App />
    </React.StrictMode>
);

// 6. 监听 store 变化重新渲染
store.subscribe(() => {
    root.render(<App />)
});